# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-crypt-openssl-rsa
pkgver=0.33
pkgrel=2
pkgdesc='RSA encoding and decoding, using the openSSL libraries'
arch=(x86_64)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=('perl>=5.6' perl-crypt-openssl-random)
makedepends=('perl-crypt-openssl-guess>=0.11')
url=https://metacpan.org/release/Crypt-OpenSSL-RSA
source=("https://cpan.metacpan.org/authors/id/T/TO/TODDR/Crypt-OpenSSL-RSA-$pkgver.tar.gz")
md5sums=(402994cca9f4502741cf9514719b9bdf)
sha512sums=(7bfa802ec41925ec9fa6937c5eea0d21f6f554a1d1d57ed679ed03b260cf08c0a397df11880de6d67abacfd843ad2c4f28b20ac58d80e183c2a83c91deb926bf)
_ddir="Crypt-OpenSSL-RSA-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  /usr/bin/perl Makefile.PL
  make
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
)

package()
(
  cd "$srcdir/$_ddir"
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
)

# Local Variables:
# mode: shell-script
# sh-basic-offset: 2
# End:
# vim:set ts=2 sw=2 et:
